﻿using Inovout.Cloud.Storage.Models;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;

namespace Inovout.Cloud.Storage.Services
{
    public interface IObjectService
    {
        IEnumerable<Object> FindAllByBucket(int bucketId);
        Object Find(Bucket bucket, string objectName);
        Object FindById(object objectId);
        void Delete(Bucket bucket, string objectName);
        void Save(Object storageObject);
        Task<Object> CopyAsAsync(string sourceBucketName, string sourceObjectName, string destinationBucketName, Object destinationObject);
        Task<Stream> GetStreamAsync(Bucket bucket, string objectName, int offset, int length);
        Task<Stream> GetStreamAsync(Bucket bucket, string objectName);

        Object FindByFile(Data.Blob.Models.File file);
        System.IO.Stream GetLocalStream(Bucket bucket, string objectName);
    }
}
